$(function(){
	var list={
		first:[{
			"id":1,
			"href":"detail.html",
			"src":"img/58cb5c42N1ce8b049.jpg!q70.jpg",
			"info":"荣耀 畅玩6X 4GB 32GB 全网通4G手机 高配版 玫瑰金",
			"price":"1299",
			"priceF":"00",
			"createTime":1494661670647
		},{
			"id":2,
			"src":"img/5490236dN172f34f3.jpg!q70.jpg",
			"info":"玄关地毯 脚踏垫进门垫门厅垫吸水地垫浴室防滑垫卫生间脚垫 特殊尺寸定做118厘米宽  10厘米长",
			"price":"12",
			"priceF":"00",
			"createTime":1494661670747
		},{
			"id":3,
			"src":"img/rBEQYVGkZcQIAAAAAAann2c2asgAACLzALQlZMABqe3333.jpg!q70.jpg",
			"info":"丽家家居 EVA木纹满铺地毯30*30cm拼块9片装沙发厨房客厅卧室拼接地毯 9片起售 浅色木纹一套9片装 300*300MM",
			"price":"37",
			"priceF":"80",
			"createTime":1494661670847
		},{
			"id":4,
			"src":"img/59166dd7N5f27b980.jpg!q70.jpg",
			"info":"花木蘭地垫3d印花加厚绒面鹅卵石地垫可定制裁剪门垫防滑进门入户脚垫厨房垫吸水吸油垫子走廊垫 图片色 定制每90厘米宽*10厘米长价格",
			"price":"7",
			"priceF":"00",
			"createTime":1494661670947
		}],
		1494661670947:[{
			"id":4,
			"src":"img/58edbcd1N83c15151.jpg!q70.jpg",
			"info":"美式铁艺小卧室灯 乡村风格阳台灯过道灯圆形灯罩书房 小清新吊灯  1头-送光源 送光源 1头-送光源",
			"price":"20",
			"priceF":"00",
			"createTime":1494661671647
		},{
			"id":5,
			"src":"img/5490236dN172f34f3.jpg!q70.jpg",
			"info":"玄关地毯 脚踏垫进门垫门厅垫吸水地垫浴室防滑垫卫生间脚垫 特殊尺寸定做118厘米宽  10厘米长",
			"price":"12",
			"priceF":"00",
			"createTime":1494661671747
		},{
			"id":6,
			"src":"img/rBEQYVGkZcQIAAAAAAann2c2asgAACLzALQlZMABqe3333.jpg!q70.jpg",
			"info":"丽家家居 EVA木纹满铺地毯30*30cm拼块9片装沙发厨房客厅卧室拼接地毯 9片起售 浅色木纹一套9片装 300*300MM",
			"price":"37",
			"priceF":"80",
			"createTime":1494661671847
		},{
			"id":7,
			"src":"img/59166dd7N5f27b980.jpg!q70.jpg",
			"info":"花木蘭地垫3d印花加厚绒面鹅卵石地垫可定制裁剪门垫防滑进门入户脚垫厨房垫吸水吸油垫子走廊垫 图片色 定制每90厘米宽*10厘米长价格",
			"price":"7",
			"priceF":"00",
			"createTime":1494661671947
	}]};
	var recommendL=[];
	var next="";
	recommendL=list.first;
	var vm=new Vue({
		el:'#recommendList',
		data:{
			recommendJson:recommendL,
			isShow:1
		},
		methods:{
			add:function(){
				next=recommendL[recommendL.length-1].createTime
				var pushData = list[next];
				console.log(pushData)
				if(!pushData || pushData.length<=0){
					this.isShow=0;
					return;
				}
				for(var i=0; i<pushData.length; i++){
					recommendL.push(pushData[i]);
					if(i == pushData.length-1){
						next = pushData[i].createTime;
					}
				}
			}
		}
	});
	$(document).on('scroll load',function(){
		if($(document).scrollTop()>=670){
			$('.fixed-toUp').css('display','block');
		}else if($(document).scrollTop()<670){
			$('.fixed-toUp').css('display','none');
		}
	});
	$('.fixed-toUp').click(function(){
		$(document).scrollTop(0);
	});
	$('.jd-header-coll i').toggle(function(){
		$('.jd-header-menu').slideDown();
	},function(){
		$('.jd-header-menu').slideUp();
	});
});